<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <head>
        <link href="CSS/style.css" rel="stylesheet" type="text/css" />
        <title>Livraria</title>
        <script type="text/javascript">
            function emailValido() {
                var txtEmail = document.forms[0].elements["email"].value;
                if (txtEmail == '') {
                    alert("E-mail invalido.\nFavor corrigir");
                    return false;
                } else {
                    var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

                    if (!re.test(txtEmail)) {
                        alert("E-mail invalido.\nFavor corrigir");
                        return false;
                    }
                }
            }
        </script>
    </head>
    <body>
        <c:import url="_templates/header.jsp" />
        <div class="conteudo">
            <h1>FALE CONOSCO</h1>
            <hr color="red">
            <form action="EnviaEmailContato" method="post" onsubmit="return emailValido();">
                <table width="100%" border="0" cellspacing="2" cellpadding="2">
                    <tr>
                        <td><div align="right">Nome:<b><i><font size="1" face="Verdana" color="#FFFFFF"></font></i></b></div></td>
                        <td><b><i><font size="1" face="Verdana" color="#FFFFFF">
                                    <input name="nome" type="text" size="38"/>
                                    </font></i></b></td>
                    </tr>
                    <tr>
                        <td><div align="right">E-mail:<b><i><font size="1" face="Verdana" color="#FFFFFF"></font></i></b></div></td>
                        <td><b><i><font size="1" face="Verdana" color="#FFFFFF">
                                    <input name="email" id="email" type="text" size="38"/>
                                    </font></i></b></td>
                    </tr>
                    <tr>
                        <td><div align="right">Telefone:<b><i><font size="1" face="Verdana" color="#FFFFFF"></font></i></b></div></td>
                        <td><b><i><font size="1" face="Verdana" color="#FFFFFF">
                                    <input name="telefone" type="text" size="38"/>
                                    </font></i></b></td>
                    </tr>
                    <tr>
                        <td><div align="right">Cidade:<b><i><b><i><font size="1" face="Verdana" color="#FFFFFF; color:#C40000"></font></i></b></i></b></div></td>
                        <td><b><i><b><i><font size="1" face="Verdana" color="#FFFFFF; color:#C40000">
                                            <input name="cidade" type="text" size="38"/>
                                            </font></i></b></i></b></td>
                    </tr>
                    <tr>
                        <td><div align="right">Assunto:<b><i><font size="1" face="Verdana" color="#FFFFFF; color:#C40000"></font></i></b></div></td>
                        <td><b><i><font size="1" face="Verdana" color="#FFFFFF; color:#C40000">
                                    <input name="assunto" type="text" size="38"/>
                                    </font></i></b></td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top;"><div align="right">Mensagem:<b><i><font size="1" face="Verdana" color="#FFFFFF"></font></i></b></div></td>
                        <td><b><i><font size="1" face="Verdana" color="#FFFFFF">
                                    <textarea name="textodamensagem" cols="36" rows="4"></textarea>
                                    </font></i></b></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input name="enviar" type="submit" value="Enviar Mensagem"/></td>
                    </tr>
                </table>
            </form>
        </div>
        <c:import url="_templates/footer.jsp" />
</html>
